const { Connection, PublicKey } = require('@solana/web3.js');

async function checkToken() {
  try {
    const connection = new Connection('https://api.devnet.solana.com', 'confirmed');
    const tokenMint = new PublicKey('FyTRmhQnwYwpWkCVzHXxfv9afpkNiuticWRffDLv9v6N'); // 新创建的代币
    const programId = new PublicKey('DW6xwBgnBY6MUf7J4i8FwaqmncfvbKvW9hN9HmCyhDLH');
    
    const [bondingCurvePda] = PublicKey.findProgramAddressSync(
      [Buffer.from('curve'), tokenMint.toBuffer()],
      programId
    );
    
    console.log('代币地址:', tokenMint.toString());
    console.log('联合曲线PDA:', bondingCurvePda.toString());
    
    const accountInfo = await connection.getAccountInfo(bondingCurvePda);
    if (!accountInfo) {
      console.log('❌ 此代币没有联合曲线账户 - 不是通过联合曲线系统创建');
    } else {
      console.log('✅ 找到联合曲线账户');
      console.log('账户数据长度:', accountInfo.data.length);
    }
  } catch (error) {
    console.error('检查失败:', error.message);
  }
}

checkToken();
